home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '87 / Source ƒ.sea / Source ƒ / Pascal ƒ / TOOLS / tools.h < prev   
Encoding:
Text File  |  1987-02-27  |  1.9 KB  |  83 lines  |  [TEXT/MACA]

  1. /*  TOOLS.H:    various #defined and typedefs for GREP */
  2.  
  3. #define    DEBUG    1    /* traces and debugs program */
  4. #define    NUL    0x00    /*  ^@  */
  5. #define    SOH    0x01    /*  ^A  */
  6. #define    STX    0x02    /*  ^B  */
  7. #define    ETX    0x03    /*  ^C  */
  8. #define    EOT    0x04    /*  ^D  */
  9. #define    ENQ    0x05    /*  ^E  */
  10. #define    ACK    0x06    /*  ^F  */
  11. #define    BEL    0x07    /*  ^G  */
  12. #define    BS    0x08    /*  ^H  */
  13. #define    HT    0x09    /*  ^I  */
  14. #define    LF    0x0A    /*  ^J  */
  15. #define    NL    LF
  16. #define    VT    0x0B    /*  ^K  */
  17. #define    FF    0x0C    /*  ^L  */
  18. #define    CR    0x0D    /*  ^M  */
  19. #define    SO    0x0E    /*  ^N  */
  20. #define    SI    0x0F    /*  ^O  */
  21. #define    DLE    0x10    /*  ^P  */
  22. #define    DC1    0x11    /*  ^Q  */
  23. #define    DC2    0x12    /*  ^R  */
  24. #define    DC3    0x13    /*  ^S  */
  25. #define    DC4    0x14    /*  ^T  */
  26. #define    NAK    0x15    /*  ^U  */
  27. #define    SYN    0x16    /*  ^V  */
  28. #define    ETB    0x17    /*  ^W  */
  29. #define    CAN    0x18    /*  ^X  */
  30. #define    EM    0x19    /*  ^Y  */
  31. #define    SUB    0x1A    /*  ^Z  */
  32. #define    CPMEOF    SUB
  33. #define    ESC    0x1B    /*  ^[  */
  34. #define    FS    0x1C    /*  ^\  */
  35. #define    GS    0x1D    /*  ^]  */
  36. #define    RS    0x1E    /*  ^^  */
  37. #define    US    0x1F    /*  ^_  */
  38. #define    DEL    0x7F    /* DEL  */
  39.  
  40. #define    TRUE    1
  41. #define    FALSE    0
  42.  
  43. #define    BOL    '^'
  44. #define    EOL    '$'
  45. #define    ANY    '.'
  46. #define    LITCHAR    'L'
  47. #define    ESCAPE    '\\'
  48. #define    CCL    '['
  49. #define    CCLEND    ']'
  50. #define    NEGATE    '^'
  51. #define    NCCL    '!'
  52. #define    CLOSURE    '*'
  53. #define    OR_SYM    '|'
  54.  
  55. #define    CLS_SIZE    128
  56.  
  57. typedef struct token{
  58.         char        tok ;
  59.         char        lchar ;
  60.         char        *string ;
  61.         struct token    *next ;
  62.         } TOKEN ;
  63.  
  64. #define TOKSIZE sizeof(TOKEN)
  65.  
  66. #define    MAXSTR    132
  67.  
  68. extern    char    *matchs() ;
  69. extern    int    amatch() ;
  70. extern    char    *in_string() ;
  71. extern    TOKEN    *getpat() ;
  72. extern    int    esc() ;
  73. extern    int    dodash() ;
  74. extern    TOKEN    *makepat() ;
  75. extern    int    unmakepat() ;
  76. extern    int    insert() ;
  77. extern    int    delete() ;
  78. extern    int    isalphanum() ;
  79. extern    int    stoupper() ;
  80. extern    int    pr_tok() ;
  81. extern    int    pr_line() ;
  82. extern    int    max() ;